<?Php
	session_start();
	header("Cache-Control: no-store, no-cache, must-revalidate");
	require("templates/func_vendedor_pedido.php");
	$tipopedido=Obtener_Tipo_Venta();
	$facturacion=Listado_Tipo_Facturacion();
?>
<HTML>
<HEAD>
<TITLE>Tipo de Venta del Pedido</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="css/style.css">
<script src="./templates/vendedor_pedido_morsa.js?ms=<?php echo time() ?>"></script>
<script src="./templates/cliente_pedido_morsa.js?ms=<?php echo time() ?>"></script>
<script type="text/javascript" src="js/bsn.AutoSuggest_c_2.0.js"></script>

<link rel="stylesheet" href="css/autosuggest_inquisitor.css" type="text/css" media="screen" charset="utf-8" />
</HEAD>
<BODY>
<div id="wrapper">
	<div id="content">

	<form name="detalleformulario"  method="post" enctype="multipart/form-data" action="" >

	<TABLE border=0 cellspacing="5" cellpadding="0" width="100%" align="center">
	<tr>
		<td width="15%">
			<h5>Cliente: </h5>
		</td>
		<td>
			<input type='textbox' id='clientebuscar' name='clientebuscar' size='20' maxlength='20' onKeyPress='return acceptNum(event)'  onkeyup='fnbusca_cliente_pedido(event);'>
			<input type='textbox' id='retclientebuscar' name='retclientebuscar' size='50' maxlength='50' onkeypress='fnbusca_codigo_pedido(event);' onkeyup='fnpresionatecla(event);' readonly border='0'>
		</td>
		<td>
			
		</td>
	</tr>
	<tr>
		<td width="15%">
			<h5>Nombre Cliente: </h5>
		</td>
		<td colspan='2'>
			<input type="text" name="nombrecliente" id="nombrecliente" size='60' />
		</td>
	</tr>
	<tr>
		<td>
			<h5>Socio:</h5>
		</td>
		<td>
			
			<span id="retsocio" ><select id='selsociospedido' name='selsociospedido' ></select></span>
		</td>
		<td>
			<span id='idcodcant' name='idcodcant'></span>
			<span id='retcodigobuscar' name='retcodigobuscar'></span>
			<span id='returnkits' name='returnkits'></span>
			<span id='returnname' name='returnname'></span>
		</td>
	</tr>
	<tr>
		<td>
			<h5>Descuento:</h5>
		</td>
		<td>
			<input type='checkbox' name='seldescuento' id='seldescuento' value='0' onclick='fncambiavdsc();'>
		</td>
		<td>
			
		</td>
	</tr>
	<tr>
		<td>
			<h5>Tipo de Venta: </h5>
		</td>
		<td colspan="2">
			<?php
				echo $tipopedido;
			?>
		</td>
	</tr>
	<tr>
		<td>
			<h5>Fletera: </h5>
		</td>
		<td colspan="2">
			<?php
				echo Listado_Fletes_Pedido();
			?>
		</td>
		
	</tr>
	<tr>
		<td>
			<h5>Facturaci&oacute;n: </h5>
		</td>
		<td colspan="2">
			<?php
				echo $facturacion;
			?>
		</td>
	</tr>
	<tr>
		<td colspan='3' align='center'>
			<input type='hidden' name='hdcte' id='hdcte' value='<?php echo $_SESSION['cvecliente']; ?>'>
			<input type='hidden' name='hdsco' id='hdsco' value='<?php echo $_SESSION['cvesocio']; ?>'>
			<input type='hidden' name='hddsc' id='hddsc' value='<?php echo $_SESSION['clientedesc2']; ?>'>
			<input type='hidden' name='hdvta' id='hdvta' value='<?php echo $_SESSION['cvetipoventa']; ?>'>
			<input type='hidden' name='hdfle' id='hdfle' value='<?php echo $_SESSION['cvefletera']; ?>'>
			<input type='hidden' name='hdfac' id='hdfac' value='<?php echo $_SESSION['cvefacturacion']; ?>'>
			<input type='hidden' name='hdtipoventana' id='hdtipoventana' value='V'>
			<input type='button' name='btgrabar' onclick='fnguardadatosvendedorpedido();' value='Guardar'>
		</td>
	</tr>
	</TABLE>
</form>
<SCRIPT>
<!--
	fnfocoventanatipoventa2();
-->
</SCRIPT>
<script type="text/javascript">
	var options = {
		script:"test.php?json=true&",
		varname:"input",
		json:true,
		callback: function (obj) { 
			document.getElementById('clientebuscar').value = obj.id; 
			fnbusca_cliente_vendedor_ajax();
		}
	};
	var as_json = new AutoSuggest('nombrecliente', options);

</script>
</div>
</div>
</BODY>
</HTML>
